﻿using AIO.Entity;
using AIO.Entity.Base;
using AIO.IService;
using AIO.IService.Base;
using AIO.Service.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIO.Service
{
    public class ReportingRepository : BaseRepository<Reporting>, IReportingRepository
    {
        protected ApiDBContext _Context { get; set; }
        public ReportingRepository(ApiDBContext dBContext) : base(dBContext)
        {
            _Context = dBContext ?? throw new ArgumentNullException(nameof(dBContext));
        }
        public Equip? Get(Guid id)
        {
            return _Context.Equips.FirstOrDefault(S => S.Id == id);
        }
        public Reporting? Get(string name)
        {
            return _Context.Reportings.FirstOrDefault(S => S.Id.ToString() == name);
        }

        Reporting? IReportingRepository.Get(Guid id)
        {
            throw new NotImplementedException();
        }
    }
}
